﻿using System;
using System.Collections.Generic;
using System.Text;
//using Mrsoft.AppData;
using MuYue.ORM;

namespace Mrsoft.Password
{
    static class SecretCardDAL
    {

        public static SecretCard GetSecretCardById(string id)
        {
            var list = FastDb.GetAll<Password>(string.Format("SerialId='{0}'", id));
            return new SecretCard(id, list);
        }

        public static void SaveSecretCard(SecretCard secretCard)
        {
            FastDb.Delete(secretCard.PasswordsList[0], "SerialId");
            FastDb.AddList(secretCard.PasswordsList);
        }
    }
}
